#!/bin/bash

# rm -rf /var/root/Library/Caches/com.hackemist.SDImageCache

rm -rf /var/root/Library/Caches/wiki.qaq.Protein
rm -rf /var/mobile/Documents/wiki.qaq.Protein
rm -rf /var/mobile/Library/Caches/com.hackemist.SDImageCache
rm -rf /var/mobile/Library/Caches/wiki.qaq.Protein
rm -rf /var/root/Documents/wiki.qaq.Protein/Downloads
rm -rf /var/root/Documents/wiki.qaq.Protein/SystemEvents

# if in update, skip double uicache that will cause trobule
FILE=/private/var/root/Documents/wiki.qaq.protein.update.reopen
if test -f "$FILE"; then
    echo "* Skipping uicache due to update!"
else
    UN=/.installed_unc0ver
    if test -f "$UN"; then
        echo "* Running uicache for unc0ver"
        uicache
    else
        CH=/.bootstrapped
        if test -f "$CH"; then
            echo "* Running uicache for checkra1n"
            uicache
        else
            echo "* Running uicache for other jailbreaks"
            uicache --all
        fi
    fi
fi

